//
//  SongerModel.m
//  NewMusic
//
//  Created by chuxinyu123 on 15/11/17.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "SongerModel.h"

@implementation SongerModel

- (void)dealloc
{
    [_pic_url release];
    [_ID release];
    [_time release];
    [_title release];
    [_count release];
    [_details release];
    [super dealloc];
}
- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}

+ (SongerModel *)songerModelWithDictionary:(NSDictionary *)dictionary
{
    SongerModel *songerModel = [[SongerModel alloc] initWithDictionary:dictionary];
    return songerModel;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqual:@"id"]) {
        self.ID = [NSString stringWithFormat:@"%@", value];
    }
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqual:@"count"]) {
        self.count = [NSString stringWithFormat:@"%@", value];
    }else{
        [super setValue:value forKey:key];
    }
}

@end
